﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>首页</title>
    <link id="theme" href="jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="jquery-easyui-1.3.1/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/default.css" rel="stylesheet" type="text/css" />
    <script src="jquery-easyui-1.3.1/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="js/jquery.timer.js" type="text/javascript"></script>
    <script type="text/javascript">
        $().ready(function () {

            var tabPanel = $('#tabPanel');

            $('#navmenu div ul > li').live('click', function (event) {
                event.preventDefault();
                var url = $(this).find('a').attr('href');
                var title = $.trim($(this).text());
                addTabs(title, url);
            });
            //添加面板
            function addTabs(title, href, icon) {
                //如果tab已经存在，则选中并刷新该tab
                if (tabPanel.tabs('exists', title)) {
                    //选中该tab
                    tabPanel.tabs('select', title);
                    //刷新该tab内容
                    var tab = tabPanel.tabs('getSelected');
                    tab.panel('refresh',href);
                } else {
                    if (href) {
                        //href方式加载
                        tabPanel.tabs('add', { title: title, href: href, closable: true, iconCls: icon || 'icon-default' });
                        //iframe方式加载
                        //                        tabPanel.tabs('add', { title: title, content: '<iframe scrolling="auto" frameborder="0"  src="' + href + '" style="width:100%;height:100%;" ></iframe>', closable: true, iconCls: icon || 'icon-default' });
                    }
                }
            }
            //更换主题
            changeTheme = function (value) {
                var href = 'jquery-easyui-1.3.1/themes/' + value + '/easyui.css';
                $('#theme').attr('href', href);
            };
        });
    </script>
</head>
<body class="easyui-layout">
    <!--Header Star-->
    <div id="north" data-options="region:'north',split:false,href:'header.htm'" style="height:60px; padding:10px; background: #E0ECFF; overflow: hidden;"></div>
    <!--Header End-->
    <!--Footer Star-->
    <div id="south" data-options="region:'south',split:false,href:'footer.htm'" style="height: 25px; padding: 10px; background: #efefef; text-align: center; overflow: hidden;"></div>
    <!--Footer End-->
    <!--Left Star-->
    <div id="west" data-options="region:'west',href:'left.htm',split:true,border:true,title:'功能菜单'" style="width: 180px; padding: 1px; overflow-x:auto;"></div>
    <!--Left End-->
    <!--Center Star-->
    <div id="center" data-options="region:'center',border:true" style="overflow-y: hidden;" >
        <div id="tabPanel" class="easyui-tabs" data-optinos="fit:true" >
            <div title="首页" id="home" href="home.htm" iconCls="icon-other-house">
            </div>
        </div>
    </div>
    <!--Center End-->
</body>
</html>
